tests: internal: input_chunk_routes: Windows support#11384
tests: internal: input_chunk_routes: Windows support#11384edsiper merged 2 commits intofluent:masterfrom
Conversation
📝 WalkthroughWalkthroughSwitch tests from hard-coded /tmp paths to environment-aware temporary directories by adding tempdir helper functions, including the helper in internal test headers, and propagating dynamic path allocation, NULL checks, and frees through multiple input-chunk tests and their setup/teardown. (30 words) Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cfa533bbda
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/internal/input_chunk_routes.c`:
- Around line 338-356: The env_tmpdir function currently checks TMPDIR then TMP
and falls back to "/tmp", which fails on Windows when TEMP is set but TMP is
not; update env_tmpdir to also check getenv("TEMP") before the fallback and on
Windows use a Windows-appropriate fallback (either call
GetTempPathA()/GetTempPathW when available or use "C:\\Temp") instead of "/tmp",
returning the result via flb_strdup to match existing allocation behavior.
🧹 Nitpick comments (1)
tests/internal/input_chunk_routes.c (1)
20-21: Remove duplicateflb_mem.hinclude.
<fluent-bit/flb_mem.h>is already included at Line 10, so the Line 20 include is redundant.♻️ Suggested cleanup
-#include <fluent-bit/flb_mem.h> `#include` <fluent-bit/flb_str.h>
cfa533b to
4a292d3
Compare
4a292d3 to
4cfe096
Compare
49ede29 to
d258f38
Compare
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
…ry dir Signed-off-by: Marat Abrarov <abrarov@gmail.com>
d258f38 to
a340cc5
Compare
Support of Windows in flb-it-input_chunk_routes tests (introduced in #11097).
Testing
TEST_PRESET=valgrind SKIP_TESTS='flb-rt-out_td flb-it-network' ./run_code_analysis.shok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.